<?php 
//define('INSIDE', true); 
//------------------ Mysqli
//$lp_root_path = './';
require_once $lp_root_path  . "../includes/DB.php"; 
require_once $lp_root_path  . "../includes/DB_Connect.php";  
/*************************************************************************** 
*    Procedures proxy class.  
*    Automated by Namikata based on a template by Cesar Andres Sanchez 
*    Do not modify by hand or changes will be lost when 
*    procedures are updated and the automated tool 
*    is run again. 
*     
*    Tool questions/bugs: namikata@gmail.com 
*	
*
*	 File creation date: 23/03/2009 11:39:58
****************************************************************************/
	class procedures
	{
	
		# Procedure list:
		# $planetId INT
		function sp_building_createPlanetBuildings($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_building_createPlanetBuildings('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $name VARCHAR(200)
		# $planetId INT
		function sp_building_eventCancel($name,$planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_building_eventCancel('".$name."','".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $event VARCHAR(200)
		function sp_building_eventExec($event)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_building_eventExec('".$event."')"); 
            return $result; 
		}
		# Procedure list:
		# $buildingId INT
		# $idPlanet INT
		function sp_building_eventStart($buildingId,$idPlanet)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_building_eventStart('".$buildingId."','".$idPlanet."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_building_eventStatus($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_building_eventStatus('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_building_getAllFromPlanet($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_building_getAllFromPlanet('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		# $userId INT
		function sp_building_getAvaliableForBuilding($planetId,$userId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_building_getAvaliableForBuilding('".$planetId."','".$userId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		# $buildingId INT
		# $buildingLevel INT
		# $buildingType INT
		function sp_building_updateLevel($planetId,$buildingId,$buildingLevel,$buildingType)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_building_updateLevel('".$planetId."','".$buildingId."','".$buildingLevel."','".$buildingType."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_defense_createPlanetDefenses($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_defense_createPlanetDefenses('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		# $name VARCHAR(200)
		# $metal INT
		# $crystal INT
		# $deuterium INT
		# $elementType INT
		# $elementNumber INT
		function sp_defense_eventAddToQueue($planetId,$name,$metal,$crystal,$deuterium,$elementType,$elementNumber)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_defense_eventAddToQueue('".$planetId."','".$name."','".$metal."','".$crystal."','".$deuterium."','".$elementType."','".$elementNumber."')"); 
            return $result; 
		}
		# Procedure list:
		# $queueId INT
		# $planetId INT
		function sp_defense_eventCancel($queueId,$planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_defense_eventCancel('".$queueId."','".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $name VARCHAR(200)
		function sp_defense_eventQueueExec($name)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_defense_eventQueueExec('".$name."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_defense_eventStatus($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_defense_eventStatus('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_defense_getAllFromPlanet($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_defense_getAllFromPlanet('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId INT
		# $planetId INT
		function sp_defense_getAvaliableForBuilding($userId,$planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_defense_getAvaliableForBuilding('".$userId."','".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_hangar_createPlanetFleet($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_hangar_createPlanetFleet('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		# $name VARCHAR(200)
		# $metal INT
		# $crystal INT
		# $deuterium INT
		# $elementType INT
		# $elementNumber INT
		function sp_hangar_eventAddToQueue($planetId,$name,$metal,$crystal,$deuterium,$elementType,$elementNumber)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_hangar_eventAddToQueue('".$planetId."','".$name."','".$metal."','".$crystal."','".$deuterium."','".$elementType."','".$elementNumber."')"); 
            return $result; 
		}
		# Procedure list:
		# $queueId INT
		# $planetId INT
		function sp_hangar_eventCancel($queueId,$planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_hangar_eventCancel('".$queueId."','".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $name VARCHAR(200)
		function sp_hangar_eventExec($name)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_hangar_eventExec('".$name."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_hangar_eventStatus($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_hangar_eventStatus('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_hangar_getAllFromPlanet($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_hangar_getAllFromPlanet('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId INT
		# $planetId INT
		function sp_hangar_getAvaliableForBuilding($userId,$planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_hangar_getAvaliableForBuilding('".$userId."','".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $systemId INT
		function sp_planets_getFromSystem($systemId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_planets_getFromSystem('".$systemId."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId INT
		function sp_planets_getFromUser($userId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_planets_getFromUser('".$userId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_planets_getFull($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_planets_getFull('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_planets_getResourcesFull($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_planets_getResourcesFull('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_planets_getResourcesLight($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_planets_getResourcesLight('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId INT
		# $planetId INT
		function sp_planets_setUser($userId,$planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_planets_setUser('".$userId."','".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_planets_triggerUpdate($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_planets_triggerUpdate('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_planets_updateBuildingSpeed($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_planets_updateBuildingSpeed('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_planets_updateResourceGeneration($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_planets_updateResourceGeneration('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		# $metal DOUBLE
		# $crystal DOUBLE
		# $deuterium DOUBLE
		function sp_planets_updateResources($planetId,$metal,$crystal,$deuterium)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_planets_updateResources('".$planetId."','".$metal."','".$crystal."','".$deuterium."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		function sp_planets_updateTechingSpeed($planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_planets_updateTechingSpeed('".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId INT
		function sp_tech_createUserTech($userId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_tech_createUserTech('".$userId."')"); 
            return $result; 
		}
		# Procedure list:
		# $name VARCHAR(200)
		function sp_tech_eventCancel($name)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_tech_eventCancel('".$name."')"); 
            return $result; 
		}
		# Procedure list:
		# $event VARCHAR(200)
		function sp_tech_eventExec($event)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_tech_eventExec('".$event."')"); 
            return $result; 
		}
		# Procedure list:
		# $techId INT
		# $planetId INT
		# $name VARCHAR(200)
		function sp_tech_eventStart($techId,$planetId,$name)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_tech_eventStart('".$techId."','".$planetId."','".$name."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId INT
		function sp_tech_eventStatus($userId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_tech_eventStatus('".$userId."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId INT
		function sp_tech_getAllFromUser($userId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_tech_getAllFromUser('".$userId."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId INT
		# $planetId INT
		function sp_tech_getAvaliableForBuilding($userId,$planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_tech_getAvaliableForBuilding('".$userId."','".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $planetId INT
		# $techId INT
		# $techLevel INT
		# $techType INT
		function sp_tech_updateLevel($planetId,$techId,$techLevel,$techType)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_tech_updateLevel('".$planetId."','".$techId."','".$techLevel."','".$techType."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId INT
		# $name VARCHAR(200)
		# $shipType INT
		# $shipNumber INT
		function sp_travel_eventAddShipsToTravelEvent($userId,$name,$shipType,$shipNumber)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_travel_eventAddShipsToTravelEvent('".$userId."','".$name."','".$shipType."','".$shipNumber."')"); 
            return $result; 
		}
		# Procedure list:
		# $name VARCHAR(200)
		function sp_travel_eventCancel($name)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_travel_eventCancel('".$name."')"); 
            return $result; 
		}
		# Procedure list:
		# $eventName VARCHAR(200)
		# $planetId INT
		function sp_travel_eventDoAttack($eventName,$planetId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_travel_eventDoAttack('".$eventName."','".$planetId."')"); 
            return $result; 
		}
		# Procedure list:
		# $targetId INT
		# $eventName VARCHAR(200)
		function sp_travel_eventDoRecycle($targetId,$eventName)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_travel_eventDoRecycle('".$targetId."','".$eventName."')"); 
            return $result; 
		}
		# Procedure list:
		# $eventName VARCHAR(200)
		function sp_travel_eventEnd($eventName)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_travel_eventEnd('".$eventName."')"); 
            return $result; 
		}
		function sp_travel_eventExec()
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_travel_eventExec()"); 
            return $result; 
		}
		# Procedure list:
		# $name VARCHAR(200)
		function sp_travel_eventShipsStatus($name)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_travel_eventShipsStatus('".$name."')"); 
            return $result; 
		}
		# Procedure list:
		# $name VARCHAR(200)
		# $type VARCHAR(50)
		# $cargoM INT
		# $cargoC INT
		# $cargoD INT
		# $planetOId INT
		# $planetTId INT
		# $powerPercent INT
		function sp_travel_eventStart($name,$type,$cargoM,$cargoC,$cargoD,$planetOId,$planetTId,$powerPercent)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_travel_eventStart('".$name."','".$type."','".$cargoM."','".$cargoC."','".$cargoD."','".$planetOId."','".$planetTId."','".$powerPercent."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId INT
		function sp_travel_eventStatus($userId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_travel_eventStatus('".$userId."')"); 
            return $result; 
		}
		# Procedure list:
		# $universe VARCHAR(200)
		function sp_universe_newSecuential($universe)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_universe_newSecuential('".$universe."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId bigint(20)
		function sp_users_getEventCountActive($userId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_users_getEventCountActive('".$userId."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId bigint(20)
		# $messageId bigint(20)
		function sp_users_getMessage($userId,$messageId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_users_getMessage('".$userId."','".$messageId."')"); 
            return $result; 
		}
		# Procedure list:
		# $userId bigint(20)
		function sp_users_getMessageList($userId)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_users_getMessageList('".$userId."')"); 
            return $result; 
		}
		# Procedure list:
		# $userNick VARCHAR(200)
		# $userPass VARCHAR(200)
		function sp_users_getUser($userNick,$userPass)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_users_getUser('".$userNick."','".$userPass."')"); 
            return $result; 
		}
		# Procedure list:
		# $userNick VARCHAR(200)
		# $userPass VARCHAR(200)
		function sp_users_getUserSimple($userNick,$userPass)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_users_getUserSimple('".$userNick."','".$userPass."')"); 
            return $result; 
		}
		# Procedure list:
		# $id INT
		function sp_users_updateLastLogin($id)
		{
			$db = new DB(); // create the object 
			$result = $db->query("call sp_users_updateLastLogin('".$id."')"); 
            return $result; 
		}
		function template_event_defenseQueue()
		{
			$db = new DB(); // create the object 
			$result = $db->query("call template_event_defenseQueue()"); 
            return $result; 
		}
		function template_event_hangarQueue()
		{
			$db = new DB(); // create the object 
			$result = $db->query("call template_event_hangarQueue()"); 
            return $result; 
		}
		function template_event_tech()
		{
			$db = new DB(); // create the object 
			$result = $db->query("call template_event_tech()"); 
            return $result; 
		}
		function tmp_attack()
		{
			$db = new DB(); // create the object 
			$result = $db->query("call tmp_attack()"); 
            return $result; 
		}
		function tmp_travelEvent()
		{
			$db = new DB(); // create the object 
			$result = $db->query("call tmp_travelEvent()"); 
            return $result; 
		}

	
	}
	
?>
